<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>RESULTADO DA CONSULTA AOS SERVIDORES</title>
</head>
<body>
<f:view>
	<f:subview id="titulo">
		<c:import url="/seguro/FragmentoTitulo.jsp"></c:import>
	</f:subview>
	<br><br>
	<f:subview id="usuarioLogado">
		<c:import url="/seguro/FragmentoUsuarioLogado.jsp"></c:import>
	</f:subview>
	<br>
	<center>
	<h:outputFormat value="RESULTADO DA CONSULTA AOS SERVIDORES" style='color: #FFFFFF; font-style: normal; font-size: 24px; font-family: "Book Antiqua", "Times New Roman", Serif; text-decoration: underline; border-top-style: solid; letter-spacing: 6px; text-align: center; background-color: #000000; border-right-style: solid; border-bottom-color: #EAE02D; border-bottom-style: solid; border-left-color: #EAE02D; border-top-color: #EAE02D; border-right-color: #EAE02D; border-left-style: solid; background-position: center center'>
		<f:param value=""></f:param>
	</h:outputFormat>
	<br><br>
	<br>
	<h:messages globalOnly="true" style="border-bottom-style: solid; border-top-style: solid; color: Blue; border-left-style: solid; background-color: AliceBlue; border-right-style: solid"></h:messages>
	<br><br>
	<h:outputText value="Nenhum Servidor foi localizado." style="font-weight: bold" rendered="#{empty servidorBean.listaServidor}"></h:outputText>
	<h:form style="width: 777px">
		<h:dataTable border="1" var="servidorSelecionado" value="#{servidorBean.listaServidor}" rendered="#{not empty servidorBean.listaServidor}">
			<h:column id="MatriculaSIAPE">
				<f:facet name="header">
					<h:outputText value="Matricula SIAPE"></h:outputText>
				</f:facet>
				<h:outputText value="#{servidorSelecionado.matriculaSIAPE}"></h:outputText>
			</h:column>
			<h:column id="nome">
				<f:facet name="header">
					<h:outputText value="Nome do Servidor"></h:outputText>
				</f:facet>
				<h:outputText value="#{servidorSelecionado.nome}"></h:outputText>
			</h:column>
			<h:column id="login">
				<f:facet name="header">
					<h:outputText value="Login"></h:outputText>
				</f:facet>
				<h:outputText value="#{servidorSelecionado.usuario.login}"></h:outputText>
			</h:column>
			<h:column id="Alterar">
				<f:facet name="header">
					<h:outputText value="Gerar nova senha"></h:outputText>
				</f:facet>
				<h:commandButton value="Gerar nova senha" action="#{servidorBean.preparaGeraNovaSenha}"></h:commandButton>
			</h:column>
			<h:column id="Excluir">
				<f:facet name="header">
					<h:outputText value="Excluir"></h:outputText>
				</f:facet>
				<h:commandButton value="Excluir" action="#{servidorBean.excluiServidor}"></h:commandButton>
			</h:column>
		</h:dataTable>
		<br>
		<hr>
		<br>
		<h:panelGrid border="0" columns="3">
			<h:commandLink action="principal">
				<h:outputText value="Retornar ao Menu Principal"></h:outputText>
			</h:commandLink>
		</h:panelGrid>
	</h:form>
	</center>
</f:view>
</body>
</html>